<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      http-equiv="X-UA-Compatible"
      content="IE=edge"
    />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>webgl入门</title>
  </head>
  <body>
    <canvas id="canvas"> 此浏览器不支持canvas </canvas>

    <script>
      const ctx = document.getElementById('canvas')
      const gl = ctx.getContext('webgl')
      gl.clearColor(1.0, 0.0, 0.0, 1.0)
      gl.clear(gl.COLOR_BUFFER_BIT)
    </script>
  </body>
</html>
